Thread: 2d [STL] Vectors

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    2d [STL] Vectors

    I loaned out my "The C++ STL" book, and now I can't seem to remember how to properly use a vector of vectors.
    (X is any class)

    If code is declared like:
    Code:
    PHP Code:
    vectorvector<X> >  V; is it accessed likeV[x][y].method_in_class_X(); ? 

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Looks right. Try it first though.

    Kuphryn

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    yeah i had tried it, yet i forgot a ">" when using a stack, causing the error.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Velocity in rotation using 2D vectors???
    By blackCat in forum Game Programming
    Replies: 1
    Last Post: 04-10-2009, 09:16 AM
  2. Vectors
    By naseerhaider in forum C++ Programming
    Replies: 11
    Last Post: 05-09-2008, 08:21 AM
  3. How can i made vectors measuring program in DevC++
    By flame82 in forum C Programming
    Replies: 1
    Last Post: 05-07-2008, 02:05 PM
  4. 2d vectors question
    By jw232 in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2008, 06:31 PM
  5. How properly get data out of vectors of templates?
    By 6tr6tr in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 10:35 AM